<template>
    <view>
        <view class="content">
            <view>
                <image src="/static/icons/role.png" mode="widthFix"></image>
                <view class="current">您的当前身份</view>
                <view class="roleName">{{role ? (role == 1 ? '消费者' : '上货员') : '未知身份'}}</view>
            </view>
        </view>
        <view class="bottom">
            <!-- <view class="tips">说明：切换成“消费者”角色后，关闭页面，再次扫码可重新以“上货员”角色登录</view> -->
            <view class="button" @click="toCustomer" v-if="role == 2">切换“消费者”身份</view>
            <view class="button" @click="toManage" v-if="role == 1">切换“上货员”身份</view>
        </view>
    </view>
</template>

<script>
    import switchRole from "./switchRole.js";
    export default switchRole;
</script>

<style>
    @import url("./switchRole.css");
</style>